home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 549 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: vb.franken.de!volker
  2. From: volker@vb.franken.de (Volker Barthelmann)
  3. Subject: Re: PPC compilers
  4. Newsgroups: comp.sys.amiga.programmer
  5. References: <4com6v$415@maureen.teleport.com> <jasonb.821098303@cs.uwa.edu.au>
  6. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  7. Message-ID: <volker.0e58@vb.franken.de>
  8. Date: 8 Jan 96 22:59:03 MET
  9. Organization: home
  10.  
  11. Jason S Birch (jasonb@cs.uwa.edu.au) wrote:
  12. :
  13. : Again: *If* he's trying to create a data type with certain
  14. : implementation-dependent size-requirements (such as in the bltcon0
  15. : case, assuming no headers to give us one) *then*, at that point in
  16. : time, he has to know the size of the type in order to define it
  17. : correctly. He stated that earlier - check what I've underlined.
  18. : However, once done, he can then safely create variables of that type
  19. : (the abstract one he's defined, which happens to be the right size) and
  20. : safely assign appropriate values to them, without having to worry if
  21. : the eventual assignments are implemented as a .c, .w, or .l. He can
  22.  
  23. In many cases, but not in all cases. It might e.g. be impossible to declare
  24. certain hardware registers precise enough in a HLL. So the programmer has to
  25. know its representation and has to do it by hand.
  26.  
  27. : The question is not about whether you need to know if a variable is a
  28. : float or a long, since they are "abstract" types (and can be different
  29. : sizes on different machines). The question is whether you need to know
  30. : how many bits are in each, and what each bit means. In assembler, you
  31. : do need to know the former, and occasionally the latter.
  32.  
  33. You sometimes need to know it in HLLs, too. Numerical calculations almost
  34. always need very detailed information on the data types. Just have a look
  35. at a C compiler's float.h.
  36.  
  37. In many cases You can forget such things after the declaration, but there
  38. are lots of other cases, too.
  39.  
  40. Volker
  41.  
  42.